package com.yt.sys.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.yt.sys.models.bo.SysUserRoleBO;
import com.yt.sys.models.dto.SysUserRoleDTO;
import com.yt.sys.models.vo.SysUserRoleVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户角色信息映射
 *
 * @author chen
 * @Date 2025-09-05 18:51:40
 */
public interface SysUserRoleMapper extends BaseMapper<SysUserRoleDTO> {

    List<SysUserRoleDTO> selectByUserId(Long userId);
    List<SysUserRoleDTO> selectByRoleId(Long roleId);

    List<SysUserRoleVO> selectUserRoleVOByUserId(Long userId);
    List<SysUserRoleVO> selectUserRoleVOByRoleId(Long roleId);
    List<SysUserRoleVO> selectUserRolePage(
            Page<SysUserRoleVO> page,
            @Param("bo") SysUserRoleBO bo
    );
}
